// 请求响应参数（不包含data）
export interface Result {
  code: string;
  msg: string;
}

// 请求响应参数（包含data）
export interface ResultData<T = any> extends Result {
  data: T;
}

// 分页响应参数
export interface ResPage<T> {
  list: T[];
  pageNum: number;
  pageSize: number;
  total: number;
}

// 分页请求参数
export interface ReqPage {
  pageNum: number;
  pageSize: number;
}

// 文件上传模块
export namespace Upload {
  export interface ResFileUrl {
    fileUrl: string;
  }
}

// 登录模块
export namespace Login {
  export interface ReqLoginForm {
    username: string;
    password: string;
    j_loginModel: string;
    j_tenantId: string;
    _spring_security_remember_me: string;
    j_username: string;
    j_password: string;
    sso: boolean;
  }
  export interface ResLogin {
    access_token: string;
  }
  export interface ResAuthButtons {
    [key: string]: string[];
  }
}

// 用户管理模块
export namespace User {
  export interface ReqUserParams extends ReqPage {
    username: string;
    gender: number;
    idCard: string;
    email: string;
    address: string;
    createTime: string[];
    status: number;
    createdOn: string[];
    departmentId: string;
    page: number;
    rows: number;
    fullName: string;
    loginName: string;
    orgType: string;
    orgNo: string;
    companyNo: string;
  }
  export interface ResUserList {
    id: string;
    username: string;
    gender: number;
    user: { detail: { age: number } };
    idCard: string;
    email: string;
    address: string;
    createTime: string;
    status: number;
    avatar: string;
    photo: any[];
    children?: ResUserList[];
    etitle: string;
    sex: boolean;
    userState: boolean;
    orgNo: string;
    userId: number;
    loginName: string;
    firstName: string;
    fullName: string;
    lastName: string;
    orgName: string;
    belongsGroupStr: string;
    phone: string;
    moblie: string;
    roles: string;
    holidayStatus: boolean;
    userCost: string;
  }
  export interface ResStatus {
    userLabel: string;
    userValue: number;
  }
  export interface ResGender {
    genderLabel: string;
    genderValue: number;
  }
  export interface ResDepartment {
    id: string;
    name: string;
    children?: ResDepartment[];
  }
  export interface ResRole {
    id: string;
    name: string;
    children?: ResDepartment[];
  }
}

// 机构管理模块
export namespace OrgManager {
  export interface ReqOrgManagerParams extends ReqPage {
    username: string;
    gender: number;
    idCard: string;
    email: string;
    address: string;
    createTime: string[];
    status: number;
    createdOn: string[];
    departmentId: string;
    page: number;
    rows: number;
    fullName: string;
    loginName: string;
    orgType: string;
    orgNo: string;
    companyNo: string;
    orgName: string;
  }
  export interface ResOrgList {
    id: string;
    username: string;
    gender: number;
    user: { detail: { age: number } };
    idCard: string;
    email: string;
    address: string;
    createTime: string;
    status: number;
    avatar: string;
    photo: any[];
    children?: ResOrgList[];
    etitle: string;
    sex: boolean;
    userState: boolean;
    sid: any;
    orgNo: string;
    endHour: number;
    endMinute: number;
    endNoonHour: number;
    endNoonMinute: number;
    startHour: number;
    startMinute: number;
    startNoonHour: number;
    startNoonMinute: number;
    friday: boolean;
    monday: boolean;
    saturday: boolean;
    allday: boolean;
    sunday: boolean;
    thursday: boolean;
    tuesday: boolean;
    wednesday: boolean;
    technicianNameFullName: string;
    orgName: string;
    typeName: string;
    officePhone: string;
    officeFax: string;
    corporate: string;
    companySize: any;
    regNumber: string;
    regCapital: string;
    fullName: string;
    loginName: string;
    technicianNames: any;
    technicianNamesStr: string;
    typeNo: number;
  }
}

// 角色管理模块
export namespace RoleManager {
  export interface RoleManagerParams extends ReqPage {}
  export interface ResRoleList {
    roleName: string;
    roleCode: string;
    roleState: boolean;
    networkIp: string;
    hostIp: string;
    dbIp: string;
    yingyong: string;
    zhongjianjian: string;
    companyNo: number;
    roleId: number;
    list_Wechat_Resource_Home: string;
    description: string;
    remark: string;
    isLeader: number;
    gangweistr: string;
  }
}

// 数据字典模块
export namespace dataDictionary {
  export interface RoleManagerParams extends ReqPage {}
  export interface ResDataDictionaryList {
    companyName: string;
    companyNo: string;
    dataFlag: number;
    groupCode: string;
    groupName: string;
    groupNo: string;
    dname: string;
    description: string;
    remark: string;
    color: string;
    dno: number;
    dcode: string;
  }
}
